<?php

/**
 * This is the model metadata class for table "notice".
 */
class NoticeMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'notice';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('receiver_id, sender_id', 'numerical', 'integerOnly'=>true),
			array('receiver_name, sender_name', 'length', 'max'=>50),
			array('type', 'length', 'max'=>30),
			array('create_time, read_time', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, receiver_id, receiver_name, sender_id, sender_name, create_time, read_time, type', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'receiver_id' => '接收用户id',
			'receiver_name' => '接收用户姓名',
			'sender_id' => '发件用户Id',
			'sender_name' => '发件用户姓名',
			'create_time' => '发件时间',
			'read_time' => '读件时间',
			'type' => '类型',
		);
	}
}